package com.ruoyi.fantasy.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fantasy.mapper.FantasyRolePermissionMapper;
import com.huanzhidadi.fantasy.bean.domain.FantasyRolePermission;
import com.ruoyi.fantasy.service.IFantasyRolePermissionService;
import com.ruoyi.common.core.text.Convert;

/**
 * fantasy角色权限关系 服务层实现
 * 
 * @author wanghui
 * @date 2019-07-05
 */
@Service
public class FantasyRolePermissionServiceImpl implements IFantasyRolePermissionService 
{
	@Autowired
	private FantasyRolePermissionMapper fantasyRolePermissionMapper;

	/**
     * 查询fantasy角色权限关系信息
     * 
     * @param permissionId fantasy角色权限关系ID
     * @return fantasy角色权限关系信息
     */
    @Override
	public FantasyRolePermission selectFantasyRolePermissionById(Integer permissionId)
	{
	    return fantasyRolePermissionMapper.selectFantasyRolePermissionById(permissionId);
	}
	
	/**
     * 查询fantasy角色权限关系列表
     * 
     * @param fantasyRolePermission fantasy角色权限关系信息
     * @return fantasy角色权限关系集合
     */
	@Override
	public List<FantasyRolePermission> selectFantasyRolePermissionList(FantasyRolePermission fantasyRolePermission)
	{
	    return fantasyRolePermissionMapper.selectFantasyRolePermissionList(fantasyRolePermission);
	}
	
    /**
     * 新增fantasy角色权限关系
     * 
     * @param fantasyRolePermission fantasy角色权限关系信息
     * @return 结果
     */
	@Override
	public int insertFantasyRolePermission(FantasyRolePermission fantasyRolePermission)
	{
	    return fantasyRolePermissionMapper.insertFantasyRolePermission(fantasyRolePermission);
	}
	
	/**
     * 修改fantasy角色权限关系
     * 
     * @param fantasyRolePermission fantasy角色权限关系信息
     * @return 结果
     */
	@Override
	public int updateFantasyRolePermission(FantasyRolePermission fantasyRolePermission)
	{
	    return fantasyRolePermissionMapper.updateFantasyRolePermission(fantasyRolePermission);
	}

	/**
     * 删除fantasy角色权限关系对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteFantasyRolePermissionByIds(String ids)
	{
		return fantasyRolePermissionMapper.deleteFantasyRolePermissionByIds(Convert.toStrArray(ids));
	}
	
}
